package jp.sourceforge.talisman.mds.cluster;

/*
 * $Id: NonHierarchicalClusteringParameter.java,v 1.1 2009/09/12 05:06:01 weiwei Exp $
 */

import jp.sourceforge.talisman.mds.Item;
import jp.sourceforge.talisman.mds.distance.ItemDistanceCalculator;

/**
 * 
 * @author Haruaki Tamada
 * @version $Revision: 1.1 $ 
 */
public class NonHierarchicalClusteringParameter extends ClusteringParameter{
    public NonHierarchicalClusteringParameter(int numberOfCluster){
        setNumberOfCluster(numberOfCluster);
    }

    public NonHierarchicalClusteringParameter(int numberOfCluster, ItemDistanceCalculator id){
        setNumberOfCluster(numberOfCluster);
        setDistanceCalculator(id);
    }

    @Override
    public boolean isValid(Item[] items){
        return items.length >= getNumberOfCluster() &&
        getDistanceCalculator() != null;
    }
}
